﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/Site.Master" AutoEventWireup="true"
	CodeBehind="FaqManagement.aspx.cs" Inherits="Hematology.UserSite.admin.FaqManagement" %>

<%@ Import Namespace="Hematology.Tools" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphRecent" runat="server">
	<hmt:PageTitle runat="server" ID="ptTitle" Text='<%$ Resources:UserSite, resTopicQuestions %>'
		ButtonText='<%$ Resources:UserSite, resWhitespace %>' ButtonCssClass="plus" ShowButton="True"
		TitleButtonType="Hyperlink" NavigateUrl="/admin/FaqManagement.aspx?view=Add" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphHeadNews" runat="server">
	<asp:MultiView runat="server" ID="mvFaq">
		<asp:View runat="server" ID="vFaqList">
			<asp:Repeater runat="server" ID="rptFaqItem" OnItemCommand="rptFaqItem_ItemCommand">
				<HeaderTemplate>
					<div class="userFullPageContainer">
						<div class="adminTableBlock">
							<div class="adminTableRow adminTableRowHeader">
								<div class="adminTableRow300">
									<asp:Label ID="lRoleNameHdr" runat="server" Text='<%$ Resources:UserSite, resQuestion %>' />
								</div>
								<div class="adminTableRow300">
									<asp:Label ID="lRoleDescriptionHdr" runat="server" Text='<%$ Resources:UserSite, resAnswer %>' />
								</div>
								<div class="adminTableRowDate">
									<asp:Label ID="lRoleCreatedDateHdr" runat="server" Text='<%$ Resources:UserSite, resDateCreated %>' />
								</div>
							</div>
				</HeaderTemplate>
				<ItemTemplate>
					<div class="adminTableRow">
						<div class="adminTableRow300">
							<asp:Label ID="lRoleName" runat="server" Text='<%# PageHelper.GetTeaser(Eval("Question")) %>' />
						</div>
						<div class="adminTableRow300">
							<asp:Label ID="lRoleDescription" runat="server" Text='<%# PageHelper.GetTeaser(Eval("Answer")) %>' />
						</div>
						<div class="adminTableRowDate">
							<asp:Label ID="lRoleCreatedDate" runat="server" Text='<%# PageHelper.SetDateCellContent(Eval("CreateDate")) %>' />
						</div>
						<div class="adminTableRowIconBlock">
							<div class="adminTableRowIcon">
								<asp:HyperLink ID="btnEditRole" runat="server" NavigateUrl='<%# String.Format("/admin/FaqManagement.aspx?view=Edit&id={0}", Eval("FaqItemId")) %>'
									ToolTip="Правка" CssClass="adminTableRowEdit" />
							</div>
							<div class="adminTableRowIcon">
								<asp:LinkButton ID="btnDeleteRole" runat="server" ToolTip="Удалить" CommandName="DeleteFaqItem"
									CommandArgument='<%# Eval("FaqItemId") %>' OnClientClick="return confirm('Подтвердите удаление')"
									CssClass="adminTableRowDelete" />
							</div>
						</div>
					</div>
				</ItemTemplate>
				<FooterTemplate>
					</div> </div>
					<div style="clear: both;">
					</div>
				</FooterTemplate>
			</asp:Repeater>
		</asp:View>
		<asp:View runat="server" ID="vFaqEdit">
			<div class="editorBlock">
				<div class="editorBlockEditControl">
					<div class="editorBlockTitle">
						<asp:Label runat="server" ID="lblQuestion" Text='<%$ Resources:UserSite, resQuestion %>' />
					</div>
					<div class="editorBlockWisiwig">
						<CKEditor:CKEditorControl runat="server" ID="ckedQuestion" BasePath="~/ckeditor"
							Height="150" />
					</div>
				</div>
				<div class="editorBlockEditControl">
					<div class="editorBlockTitle">
						<asp:Label runat="server" ID="lblAnswer" Text='<%$ Resources:UserSite, resAnswer %>' />
					</div>
					<div class="editorBlockWisiwig">
						<CKEditor:CKEditorControl runat="server" ID="ckedAnswer" BasePath="~/ckeditor" Height="150" />
					</div>
				</div>
				<div class="editorBlockButton">
					<asp:Button runat="server" ID="btnSave" Text='<%$ Resources:UserSite, resSave %>'
						OnClick="btnSave_Click" />
					<asp:Button runat="server" ID="btnList" Text='<%$ Resources:UserSite, resToList %>'
						OnClick="btnList_Click" />
				</div>
			</div>
		</asp:View>
	</asp:MultiView>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphBody" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphPanel" runat="server">
</asp:Content>
